function repeatStringNumTimes(str, num) {
    return new Array(num).fill(str).join('');
}

document.writeln(repeatStringNumTimes("abc", 3));
